    <div class="container top">   
          <?php
              foreach($total_exam_marks_data as $row)
              {
                 echo '<div class="tablestudentnamefont"><span>Group Name&nbsp;&nbsp;:&nbsp;</span><span>'.$row['group_id'].'</span></div><br/><br/>';
                 echo '<input type="hidden" id="group_id" name="group_id" value="'.$row['group_id'].'">';
                 break;
              }
           ?>
           <input type="hidden" id="exam_id" name="exam_id" value="first_term">
           <div style="text-align: center" align="center">
            <table style="text-align: center;width: 70%" align="center" class="globaltable globaltable-striped globaltable-bordered globaltable-condensed">
             <?php
                    echo '<tr>';
                    echo '<th>Subject Name</th>';
                    echo '<th>F. Term CT</th>';
                    echo '<th>F. Term Hall MCQ</th>';
                    echo '<th>F. Term Hall CQ</th>';
                    echo '<th>F. Term Hall Total</th>';
                    echo '<th>F. Term grand Total</th>';
                    echo '<th>Pro. Test MCQ</th>';
                    echo '<th>Pro. Test CQ</th>';
                    echo '<th>Pro. Test Prac</th>';
                    echo '<th>Pro. Test Total</th>';
                    echo '<th>Pre-Test CT</th>';
                    echo '<th>Pre-Test MCQ</th>';
                    echo '<th>Pre-Test CQ</th>';
                    echo '<th>Pre-Test total</th>';
                    echo '<th>Pre-Test Grand total</th>';
                    echo '<th>Paper1 MCQ</th>';
                    echo '<th>Paper1 CQ</th>';
                    echo '<th>Paper1 Total</th>';
                    echo '<th>Paper2 MCQ</th>';
                    echo '<th>Paper2 CQ</th>';
                    echo '<th>Paper2 Total</th>';
                    echo '<th>Test Grand Total</th>';
                    echo '</tr>';
                    $i=0;
                  foreach($total_exam_marks_data as $row)
                  {
                  	$i=$i+1;
                    echo '<tr>';
                    echo '<td style="text-align: center" > '.$row["subject_id"].'<input type="hidden"  name="subject_id[]" value="'.$row["subject_id"].'"></td>';
                    
                    echo '<td> <input type="text" size="5" style="text-align: center" id="f_y_1st_ct'.$i.'"  name="f_y_1st_ct[]" value="'.$row["f_y_1st_ct"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="f_y_1st_ht_mcq'.$i.'"  name="f_y_1st_ht_mcq[]" value="'.$row["f_y_1st_ht_mcq"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="f_y_1st_ht_cq'.$i.'"  name="f_y_1st_ht_cq[]" value="'.$row["f_y_1st_ht_cq"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="f_y_1st_ht_total'.$i.'"  name="f_y_1st_ht_total[]" value="'.$row["f_y_1st_ht_total"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="f_y_1st_gran_total'.$i.'"   name="f_y_1st_gran_total[]" value="'.$row["f_y_1st_gran_total"].'"></td>';
                    
                    echo '<td> <input type="text" size="5" style="text-align: center" id="f_y_pro_ht_mcq'.$i.'"  name="f_y_pro_ht_mcq[]" value="'.$row["f_y_pro_ht_mcq"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="f_y_pro_ht_cq'.$i.'"  name="f_y_pro_ht_cq[]" value="'.$row["f_y_pro_ht_cq"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="f_y_pro_ht_prac'.$i.'"  name="f_y_pro_ht_prac[]" value="'.$row["f_y_pro_ht_prac"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="f_y_pro_ht_total'.$i.'"  name="f_y_pro_ht_total[]" value="'.$row["f_y_pro_ht_total"].'"></td>';
                    
                    echo '<td> <input type="text" size="5" style="text-align: center" id="s_y_pre_ct'.$i.'"  name="s_y_pre_ct[]" value="'.$row["s_y_pre_ct"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="s_y_pre_ht_mcq'.$i.'"  name="s_y_pre_ht_mcq[]" value="'.$row["s_y_pre_ht_mcq"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="s_y_pre_ht_cq'.$i.'"  name="s_y_pre_ht_cq[]" value="'.$row["s_y_pre_ht_cq"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="s_y_pre_ht_total'.$i.'"  name="s_y_pre_ht_total[]" value="'.$row["s_y_pre_ht_total"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="s_y_pre_gran_total'.$i.'"  name="s_y_pre_gran_total[]" value="'.$row["s_y_pre_gran_total"].'"></td>';
                    
                    echo '<td> <input type="text" size="5" style="text-align: center" id="s_y_t_p1_mcq'.$i.'"  name="s_y_t_p1_mcq[]" value="'.$row["s_y_t_p1_mcq"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="s_y_t_p1_cq'.$i.'"  name="s_y_t_p1_cq[]" value="'.$row["s_y_t_p1_cq"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="s_y_t_p1_total'.$i.'"  name="s_y_t_p1_total[]" value="'.$row["s_y_t_p1_total"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="s_y_t_p2_mcq'.$i.'"  name="s_y_t_p2_mcq[]" value="'.$row["s_y_t_p2_mcq"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="s_y_t_p2_cq'.$i.'"  name="s_y_t_p2_cq[]" value="'.$row["s_y_t_p2_cq"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="s_y_t_p2_total'.$i.'"  name="s_y_t_p2_total[]" value="'.$row["s_y_t_p2_total"].'"></td>';
                    echo '<td> <input type="text" size="5" style="text-align: center" id="s_y_test_gra_total'.$i.'"  name="s_y_test_gra_total[]" value="'.$row["s_y_test_gra_total"].'"></td>';
                    echo '</tr>';
                  }
                ?>   
             </table>
           </div>
           <div class="form-actions">
            <input type="submit"  value="Save changes" class="btn btn-primary"  size="10" />
          </div>
      
    </div>
     